package com.geekaca.d2.homework;

import java.util.Scanner;

public class Test2 {
    public static void main(String[] args) {
        System.out.println("练习2");
        Scanner scanner = new Scanner(System.in);

        while (true) {
            System.out.print("请输入消费金额：");
            double money = scanner.nextDouble();
            if (money >= 1000) {
                System.out.println("您的消费享受8折优惠,支付金额为: " + money * 0.8 + "元");
            } else {
                System.out.println("您的消费不享受优惠,请按原价支付:" + money + "元");
            }

        }


    }
}
